﻿using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;

namespace SmallBusinessKit.Models.Entities
{
    public class Category : BaseEntity
    {
        #region Properties

        [Index(IsUnique = true)]
        public string   Title                                       { get; set; }
        public string   Desc                                        { get; set; }
        public string   ImageUrl                                    { get; set; }
        public string   ImageAltText                                { get; set; }
        public string   ParentId                                    { get; set; }
        public bool     IsVisible                                   { get; set; }
     // public int?     DisplayOrder                                { get; set; }    // defined in original but never used

        #endregion

        #region Navigation Properties

        public virtual Category                 Parent              { get; set; }
        public virtual ICollection<Category>    ChildCategories     { get; set; }
        public virtual ICollection<Item>        Items               { get; set; }

        #endregion
    }
}
